package com.zzyl.controller.customer;

import com.zzyl.base.PageResponse;
import com.zzyl.base.ResponseResult;
import com.zzyl.service.impl.CustomerNursingProjectServiceimpl;
import com.zzyl.vo.NursingProjectVo;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import static com.zzyl.base.ResponseResult.success;

@RestController
@RequestMapping("/customer/orders/project")
@Api(tags = "用户端服务接口")
public class CustomerNursingProjectController {
    @Autowired
    private CustomerNursingProjectServiceimpl customerNursingProjectServiceimpl;
    @GetMapping("/page")
    public ResponseResult pageNursingProject(String name, Integer pageNum, Integer pageSize, Integer status) {
        PageResponse<NursingProjectVo> pageInfo = customerNursingProjectServiceimpl.pageCustomer(name, pageNum, pageSize, status);
        return success(pageInfo);

    }
    @GetMapping("/{id}")
    public ResponseResult getNursingProject(@PathVariable Long id) {
        NursingProjectVo nursingProject = customerNursingProjectServiceimpl.getNursing(id);
        return success(nursingProject);
    }


}
